#include <iostream>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <vector>

using namespace std;

const int MAXN = 1e5 + 10;

vector<int> g[MAXN];

int n, u, v;

int main() {
    cin >> n;
    for (int i = 1; i <= n-1; i++) {
        cin >> u >> v;
        g[u].push_back(v);
        g[v].push_back(u);
    }

    bool flag = false;
    for (int i = 1; i <= n; i++) {
        if (g[i].size() == n-1) {
            flag = true;
            break;
        }
    }

    puts(flag ? "Yes" : "No");
    return 0;
}